package util;

import java.util.List;

/**
 * @author xym
 * @date 2020/3/15
 */
public class DataUtil {
    /**
     * 将list中的内容转换为String, 多个内容之间用分隔符隔开
     */
    public static String listToString(List<?> list, char separator) {
        StringBuilder sb = new StringBuilder();
        for (Object o : list) {
            sb.append(o).append(separator);
        }
        return sb.toString();
    }
}
